import React, { Component } from 'react';
import './css/index.css'
import axios from 'axios'
class App extends Component {
  constructor(props) {
    // 组件的构造函数中 一定要加入super
    super(props);
    this.state = {
      msg: "hello"
    }
  }
  render() {
    return (
      <div className="item">
        {this.state.msg}
      </div>
    );
  }
  componentDidMount() {
    axios.get('http://122.112.161.135:3000/top/playlist').then(res => {
      console.log(res);
    })
  }
}

export default App;